//
//  rightCell.m
//  ILiangCang
//
//  Created by ZX on 16-4-19.
//  Copyright (c) 2016年 CRQ. All rights reserved.
//

#import "rightCell.h"
#import "Masonry.h"

@implementation rightCell

- (void)awakeFromNib {
    // Initialization code
}

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self)
    {
        self.backgroundColor = [UIColor colorWithRed:185.0/255 green:210.0/255 blue:220.0/255 alpha:1];
        _header = [[UIImageView alloc]init];
        _header.layer.cornerRadius = 25;
        _header.clipsToBounds = YES;
        [self addSubview:_header];
        [_header mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.mas_left).with.offset(25);
            make.centerY.mas_equalTo(self.mas_centerY);
            make.height.mas_equalTo(50);
            make.width.mas_equalTo(50);
        }];
        
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.textColor = [UIColor blackColor];
        _titleLabel.font = [UIFont systemFontOfSize:13];
        [self addSubview:_titleLabel];
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(_header.mas_right).with.offset(10);
            make.bottom.mas_equalTo(self.mas_centerY).with.offset(-3);
        }];
        
        _noteLabel = [[UILabel alloc]init];
        _noteLabel.textColor = [UIColor lightGrayColor];
        _noteLabel.font = [UIFont systemFontOfSize:12];
        [self addSubview:_noteLabel];
        [_noteLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(_header.mas_right).with.offset(10);
            make.top.mas_equalTo(self.mas_centerY).with.offset(3);
            make.right.mas_equalTo(self.mas_right).with.offset(-10);
        }];

        
        
    }
    return self;
    
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
